// plugins/scrollreveal.js

import ScrollReveal from 'scrollreveal';

export default {
  install(app, options) {
    const defaultOptions = {
      duration: 800,
      scale: 1,
      distance: '50px',
      mobile: true
    };

    const mergedOptions = { ...defaultOptions, ...options };

    const sr = ScrollReveal(mergedOptions);
    app.config.globalProperties.$scrollReveal = sr;
    app.provide('scrollReveal', sr);
  }
};
